#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
	int n;
	double b;
	cin >> n;
	if (n <= 150) {
		b = n * 0.4463;
	}
	else if (n > 150 && n <= 400) {
		b = 150 * 0.4463;
		b += (n - 150) * 0.4663;
		
	}
	else {
		b = 150 * 0.4463;
		b += (400 - 150) * 0.4663;
		b += (n - 400) * 0.5663;
	}
	cout << fixed << setprecision(1) << b << endl;
	return 0;
}